package com.hnhp.controller;

import com.hnhp.model.CarVideo;
import com.hnhp.model.CarVideoQuery;
import com.hnhp.model.Cargoods;
import com.hnhp.model.CargoodsQuery;
import com.hnhp.service.CarVideoService;
import com.hnhp.service.CargoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/goods")
@CrossOrigin
public class CargoodsController {
    //引入 数据逻辑类
    @Autowired
    private CargoodsService service;

    @GetMapping()
    public List<Cargoods> select(CargoodsQuery query){
        return service.select(query);
    }




}
